package json

import (
	"io"
	"sieve_engine/lib/encoding/json"
)

type RawMessage = json.RawMessage

func Marshal(v any) ([]byte, error) {
	return json.Marshal(v)
}

func Unmarshal(data []byte, v any) error {
	return json.Unmarshal(data, v)
}

func MarshalIndent(v any, prefix, indent string) ([]byte, error) {
	return json.MarshalIndent(v, prefix, indent)
}

type Encoder = json.Encoder

func NewEncoder(w io.Writer) Encoder {
	return json.NewEncoder(w)
}

type Decoder = json.Decoder

func NewDecoder(r io.Reader) Decoder {
	return json.NewDecoder(r)
}
